This article focuses on some concepts of exception mechanisms in Java. The purpose of writing this article is to help me remember these things quickly after a long time. 1. Exception mechanism 1.1 The exception mechanism refers to how the program
This article focuses on some concepts of exception mechanisms in Java. The purpose of this article is to make it easy for me to remember these things quickly after a long time.
1. Abnormal mechanisms
The 1.1 exception mechanism refers to how the
Document directory
Java. lang. Throwable
Java. lang. Error
Java. lang. Exception
Java. lang. RuntimeException
Generally, exceptions in Java are divided into three types:
Error: this exception is designed not to be captured because it is
Author: MaverickBlog:Http://blog.csdn.net/zhaohuabing reprinted please indicate the source1 IntroductionBefore the emergence of the Java language, traditional Exception Handling Methods mostly use return values to identify exceptions in programs.
Throwable is the parent of error handling in all Java programs, and there are two types of assets: Error and Exception.Error: Indicates an unexpected fault detected by the JVM, because this is a serious error at the JVM level, which prevents the JVM
I. Concepts of understanding anomalies and handling exceptionsAn exception is an abnormal event that occurs during the course of a program's operation, and it interrupts a running program.Exception is not an errorThe key position in the program has
1. Exception mechanism1.1 exception mechanism refers to how the program handles when a program error occurs. Specifically, the exception mechanism provides a secure channel for program exits. When an error occurs, the process of executing the
first, Exception IntroductionWhat is an exception?An exception is something that is different from the norm and is not the same as the normal Situation. In java, the case of blocking the current method or scope is called an Exception.What is the
Exceptions in Java Grandpa Class for Throwable, he has two sons Error and Exception All exceptions in Java inherit the Java.lang.Throwable classError: Indicates an unexpected error detected by the JVM virtual machine, because this is a serious
What are the differences between runtime exceptions and general exceptions:An exception indicates an abnormal state that may occur during the running of the program,Running exceptions indicate exceptions that may be encountered during common
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.